﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using DotNetLib.Windows;

namespace DotNetLib.Sample.Windows
{
  static class Program
  {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
      using (SingleProgramInstance spi = new SingleProgramInstance())
      {
        if (spi.IsSingleInstance)
        {
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
          Application.Run(new MainForm());
        }
        else
        {
          spi.RaiseOtherProcess();
        }
      }
    }
  }
}
